//大厅游戏列表ui
import CMountMgr from "../SuperMgr/cMountMgr"
import cModuleMgr from "../SuperMgr/cModuleMgr"
import cDataMgr from "../DataMgr/cDataMgr"
import cClubMainModule from "./cClubMainModule"
const { ccclass, property } = cc._decorator;
@ccclass
export default class cClubsMount extends CMountMgr {
    @property(cc.Node) 
    private content:cc.Node    = null; //容器
     //组件脚本启动扩展
     protected extendStart(){
        let packs:s2c_clubClubs = cDataMgr.getClubs()
        let clubs:s2c_clubClub[] = packs.clubs
        clubs.forEach(club => {
            this.pushBackSub(club)
        });
     }

     //初始化俱乐部节点
     protected pushBackSub(club:s2c_clubClub){
        let mod:cModuleMgr = new cClubMainModule(club)
        mod.settingscreen(this.content)
        mod.changeStart()
     }
}
